$(function(){
		var html='<div class="video" id="multimedia_video" style="display:none;z-index:999;">';
			html+='<div class="multimedia_object" style="width:100%;height:100%">';
			html+='<object id="object" style="z-index:-1;" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" controls="controls">';
			html+='<param name="FileName" value="" />';
			/* html+='<param name="AutoStart" value="0" />'; */
			html+='<param name="wmode" value="opaque" />';
			html+='<param name="windowlessVideo" value="1" />';
			html+='<embed id="embed" src="" windowlessVideo="1" allowfullscreen="false" showcontrols="1" autoplay="true"></embed>';
			
			html+='</object>';
			html+="</div>"
			html+='<div class="multimedia_close" ><img src="img/close.png" class="multimedia_close" /></div>';
			html+='</div>';
			$("body").prepend(html);
		$(".multimedia>.multimedia_preview").on("click",function(){
			
			var multimedia=$(this).parent(".multimedia").attr("url");
			$("#multimedia_video").find("#object")[0].FileName =multimedia;
			$("#multimedia_video").find("#embed").attr("src",multimedia);
			$("#embed,#object").attr("width","100%");
			$("#embed,#object").attr("height","100%");
			$("body").css("overflow","hidden");
			$("#multimedia_video").show();
			
		});
		$("#multimedia_video .multimedia_close").on("click",function(){
			if(window.ActiveXObject){
				document.getElementById("object").stop();
			}else{
				//document.getElementById("embed").pause();
			}
			$("body").css("overflow","auto");
			$("#multimedia_video").hide();
			//document.getElementById("embed").reset()
			addMultimedia()
		})
})
function addMultimedia(){

		var html='<object id="object" style="z-index:-1;" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" controls="controls">';
		html+='<param name="FileName" value="" />';
		/* html+='<param name="AutoStart" value="0" />'; */
		html+='<param name="wmode" value="opaque" />';
		html+='<param name="windowlessVideo" value="1" />';
		html+='<embed id="embed" src="" windowlessVideo="1" allowfullscreen="false" showcontrols="1" autoplay="true"></embed>';
		
		html+='</object>';
		//html+='<div class="multimedia_close" ><img src="img/close.png" class="multimedia_close" /></div>';
		
		$(".multimedia_object").html(html);
}